package com.md.api.common.utils;

public class ValidateUtils {

	/**
	 * 手机号码格式校验
	 * @param phone
	 * @return
	 */
	public static boolean phone(String phone) {
		String regex = "^(1[1-9][0-9])\\d{8}$"; 
		return phone.matches(regex);
	}
	
	/**
	 * 英文打头,包含数字下划线
	 * @param str
	 * @return
	 */
	public static boolean letter(String str) {
		String regex = "^[a-zA-Z][a-zA-Z0-9_]+$"; 
		return str.matches(regex);
	}
}
